import Relay from "react-relay";

export default class GetGoodsListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getGoodsList }`;
    }

    getVariables() {
        return {
            argsInput: {
                companyId: this.props.companyId,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getGoodsListPayload {
            responseData {
                errorCode
                value
                totalResult
                id
                goodsInfoDescModelList{
                   styleNo
                   pattern
                   productName
                   specification
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on getGoodsListPayload {
                    responseData {
                        errorCode
                        value
                        totalResult
                        id
                        goodsInfoDescModelList{
                           styleNo
                           pattern
                           productName
                           specification
                        }
                    }
                }
            `]
        }];
    }

}

